<?php
if ($_GET['type'] == 'lic') {
	include "islogin.php";
	if ($is_log == "1") {
		setcookie("nickname", $nickname, time() - 180000, "/");
		setcookie("check", $checkcode, time() - 180000, "/");
		echo "1";
	} else {

		include 'setting.php';
		$con = mysqli_connect($sqldatabase, $sqlusername, $sqlpassword,$sqltable);
		mysqli_query($con,'set names utf8'); 
		mysqli_query($con,"DELETE FROM softlic WHERE usertoken = '" . $_GET["usertoken"] . "'");
		echo "0";
		mysqli_close($con);
	}
} else if ($_GET['type'] == 'soft') {
	include "islogin.php";
	if ($is_log == "1") {
		setcookie("nickname", $nickname, time() - 180000, "/");
		setcookie("check", $checkcode, time() - 180000, "/");
		echo "1";
	} else {

		include 'setting.php';
		$con = mysqli_connect($sqldatabase, $sqlusername, $sqlpassword,$sqltable);
		mysqli_query($con,'set names utf8'); 
		mysqli_query($con,"DELETE FROM softlist WHERE softid = '" . $_GET["softid"] . "'");
		echo "0";
		mysqli_close($con);
	}
} else {
	echo 'BAD REQUEST!PLEASE TRY AGAIN!';
}
?>